﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Dapper_Core.BLL.Interface;
using Microsoft.AspNetCore.Mvc;

namespace Dapper_Core.Web.Controllers
{
    public class DependencyParameterController : Controller
    {
        private IAnimalService animalService;
        public DependencyParameterController(IAnimalService animalService)
        {
            this.animalService = animalService;
        }

        public IActionResult Index()
        {
            ViewData["name"] = animalService.Name;
            ViewData["type"] = animalService.Type;
            ViewData["run"] = animalService.Run();
            return View();
        }
    }
}